const DataBaseconnections = require('../app/database')
class CommentService {
  async createMoment(content, moment_id, userid) {
    const statement = `INSERT INTO comment(content,moment_id,user_id) VALUES(?,?,?);`
    // 将user存入数据库
    const results = await DataBaseconnections.execute(statement, [content, moment_id, userid])
    return results
  }
}

module.exports = new CommentService()
